package com.zc58s.springbootjacksondemo.beans;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PcResult {
    private int code;
    private String Message;
    private Integer PageCount;
    private Object Data;

    public PcResult()
    {
        this.setCode(0);
        this.setMessage("成功！");
    }
    public PcResult(Object data)
    {
        this.setData(data);
        this.setCode(0);
        this.setMessage("成功！");
    }
    public PcResult(Integer pageCount, Object data)
    {
        this.setPageCount(pageCount);
        this.setData(data);
        this.setCode(0);
        this.setMessage("成功！");
    }
    public PcResult(int code, String message)
    {
        this.setCode(code);
        this.setMessage(message);
    }
}
